package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.Orders;
import com.sky.entity.User;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@Mapper
public interface UserMapper {

    //根据openid查询用户
    @Select("SELECT * FROM sky_take_out.user WHERE openid=#{openid}")
    User getbyopenid(String openid);

    //插入用户
    void insert(User user);

    @Select("select * from sky_take_out.user where id =#{userId}")
    User getById(Long userId);


    Integer countbyMap(Map map);

}
